package com.cloudbroker.openapi.manage.controller;

import com.cloudbroker.bcs.common.util.VOUtil;
import com.cloudbroker.bcs.csvc.lightinvesting.api.t2service.LedThreeT2Service;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.baseRelevanted.*;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.response.baseRelevanted.*;
import com.cloudbroker.bcs.platform.ltb.bizapi.t2service.admin.OperaManageT2BizService;
import com.cloudbroker.bcs.platform.ltb.common.ext.annotation.SaveLog;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import static com.cloudbroker.bcs.platform.ltb.common.util.RequestUtil.getSingleParameterMapForBody;

/**
 * Created by fangyf18371 on 2017/1/12.
 * 运营管理端
 */
@Controller
public class OperationManagerController {
    @Resource
    private LedThreeT2Service ledThreeT2Service;
    @Resource
    private OperaManageT2BizService operaManageT2BizService;


    /**
     * 组合信息修改审核通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/manage/combine_mod_verify")
    @SaveLog(remark = "组合信息修改审核通过")
    public CombineModVerifyVo func_combine_mod_verify(HttpServletRequest request, String jsonpcallback){
        CombineModVerifyForm form = getSingleParameterMapForBody(request , CombineModVerifyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_mod_verify(form), jsonpcallback);
    }

    /**
     * 组合信息修改审核不通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/manage/combine_mod_notverify")
    @SaveLog(remark = "组合信息修改审核不通过")
    public CombineModNotverifyVo func_combine_mod_notverify(HttpServletRequest request, String jsonpcallback){
        CombineModNotverifyForm form = getSingleParameterMapForBody(request , CombineModNotverifyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_mod_notverify(form), jsonpcallback);
    }

    /**
     * 投顾组合信息修改申请查询
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/manage/combine_modapply_qry")
    @SaveLog(remark = "投顾组合信息修改申请查询")
    public CombineModapplyQryBackVo func_combine_modapply_qry(HttpServletRequest request, String jsonpcallback){
        CombineModapplyQryForm form = getSingleParameterMapForBody(request , CombineModapplyQryForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_modapply_qry(form), jsonpcallback);
    }

    /**
     * 组合关闭申请审核通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/manage/combine_closeapply_verify")
    @SaveLog(remark = "组合关闭申请审核通过")
    public CombineCloseapplyVo func_combine_closeapply_verify(HttpServletRequest request, String jsonpcallback){
        CombineCloseapplyForm form = getSingleParameterMapForBody(request , CombineCloseapplyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_closeapply_verify(form), jsonpcallback);
    }

    /**
     * 组合关闭申请审核不通过
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/manage/combine_close_notverify")
    @SaveLog(remark = "组合关闭申请审核不通过")
    public CombineCloseNotverifyVo func_combine_close_notverify(HttpServletRequest request, String jsonpcallback){
        CombineCloseNotverifyForm form = getSingleParameterMapForBody(request , CombineCloseNotverifyForm.class);
        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_close_notverify(form), jsonpcallback);
    }

    /**
     * 投顾组合关闭申请查询
     * @param request
     * @param jsonpcallback
     * @return
     */
    @ResponseBody
    @RequestMapping("/manage/combine_closeapply_qry")
    @SaveLog(remark = "投顾组合关闭申请查询")
    public CombCloseapplyQryBackVo func_combine_closeapply_qry(HttpServletRequest request, String jsonpcallback){
        CombCloseapplyQryForm form = getSingleParameterMapForBody(request , CombCloseapplyQryForm.class);

        return VOUtil.setJsonpResult(ledThreeT2Service.func_combine_closeapply_qry(form), jsonpcallback);
    }

}
